package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/3/8
 **/
public class oosdemo {
    public static void main(String[] args) throws IOException {
        String name="大一";
        int age=23;
        String gender="男";
        String[] otherInfo={"是一名澡堂老板","冲绳的","喜欢大二"};

        student zs=new student(name,age,gender,otherInfo);
        System.out.println(zs);
        FileOutputStream fos=new FileOutputStream("liweisi.dog");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(zs);
        System.out.println("写出完毕");
        oos.close();
        /*
        String name="大一";
        int age=23;
        String gender="男";
        String []otherInfo={"是一名澡堂老板","冲绳的","喜欢篮球"};
        student zs=new student{name,age,gender.otherInfo};
        System.out.prinrln(zs);
        FileOutputStream fos=new FileOutputStream(liweisi.dog);
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(zs);
        System.out.println("写出完毕");
        oos.close;
         */
    }
}
